package com.dao;

import com.entity.Admin;
import com.entity.Company;
import com.entity.User;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    public Admin selectAllAdmin(String name,String pwd);
    public User selectAllUser(String name, String pwd);
    public Company selectAllCompany(String name, String pwd);

    public List<Object> selectCompanyList();
    public List<Object> selectCompanyList(String page,String limit);
    public List<Object> selectCompanyList(HttpServletRequest req, HttpServletResponse resp)  throws SQLException, ServletException, IOException;
    public List<Object> selectAllCompanyList(HttpServletRequest req, HttpServletResponse resp)  throws SQLException, ServletException, IOException;
    public List<Object> selectUserList(HttpServletRequest req, HttpServletResponse resp)  throws SQLException, ServletException, IOException;

    public int countCompany() throws SQLException;
    public int countCompany(HttpServletRequest req, HttpServletResponse resp) throws SQLException, ServletException, IOException;
    public int countUser(HttpServletRequest req, HttpServletResponse resp) throws SQLException, ServletException, IOException;
    public int addUser(User user);
    public int addCompany(Company company);

}
